<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<c:set var="ctx" value="${pageContext.request.contextPath}"/>
		<base href="${ctx}">
		<title>My JSP 'Main.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	</head>

	<body>
    <a href="${ctx}/add.jsp">新增用户</a><br><br>
		<form name="form1" method="post" action="">
			<table width="451" height="115" border="1">
				<tr>
					<td width="56" height="37">
						用户ID
					</td>
					<td width="90">
						用户账号
					</td>
					<td width="93">
						用户密码
					</td>
					<td width="82">
						说明
					</td>
					<td width="78">
						操作
					</td>
				</tr>
				<c:forEach var="user" items="${users}">
   				<tr>
					<td>${user.id}</td>
					<td>${user.username}</td>
					<td>${user.password}</td>
					<td>${user.explains}</td>
					<td>
						<!--<a href="${ctx}/servlet/update?username=${user.username}&password=${user.password}&explains=${user.explains}&id=${user.id} ">修改</a>
						-->
						<a href="${ctx}/servlet/update?username=${user.username}&password=${user.password}&explains=${user.explains}&id=${user.id}">更新</a>
						<a href="${ctx}/delete.jsp?username=${user.username}">删除</a></td>
						</tr>
				</c:forEach>
			</table>
		</form>
		
	</body>
</html>
